home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 8 / Mac Magazin and MacEasy Magazine CD - Issue 08.iso / Sharewarebibliothek / Grafik⁄DTP / SODAColor™2.0 / Example Plug-In < prev    next >
Text File  |  1994-09-23  |  2KB  |  76 lines

  1. --SODABuildPlug
  2. --Plug-In Demo
  3.  
  4. on mouseUp
  5.   answer "This Plug-In is an example piece of code that does nothing."
  6. end mouseUp 
  7.  
  8. ∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞
  9. SODAColor™
  10. PLUG-IN WRITING DOCUMENTATION:
  11.  
  12. If you are used to Hypercard scripting, you may want to experiment with
  13. this new feature of SODAColor.  If not, this will probably not mean very
  14. much to you.  
  15.  
  16. This document is actually a Hypercard script 
  17. which can be easily imported into your collection
  18. of Plug-Ins by selecting Import Plug-In from 
  19. the Special Effects Button on the Edit Palette.
  20.  
  21. More extensive documentation for creating your own scripts will be provided
  22. periodically.  If you register your copy of SODAColor, you will not only receive
  23. free updates as they are made available, but you will also be sent snippets of
  24. code.  
  25.  
  26. Okay, briefly, the code structure follows this form:
  27.  
  28. --SODABuildPlug  <--This MUST be your first line!!! 
  29. --My Test Plug   <--The name you want your plug-in to use.
  30.  
  31. Next, simply enter your own code in the form of an on mouseUp script: 
  32.  
  33. on mouseUp
  34.   answer "This Plug-In is an example piece of code that does nothing."
  35. end mouseUp 
  36.  
  37.  What can go into a plug-in?  
  38.  
  39. Anything you would normally put in an on mouseUp script: 
  40.  
  41. on mouseUp
  42.   Answer "Who is your favorite actor?" with "Ron" or "George" or "Bill"
  43.         if it is "Ron" then domenu "Quit HyperCard"
  44.         if it is "George" then play "Car Horn"
  45.         if it is "Bill" then play "Boink"
  46. end mouseUp
  47.  
  48. Including local functions:
  49.  
  50. on mouseUp
  51.   Answer "Who is your favorite leader?" with "Nancy" or "Barbara" or "Hillary"
  52.         if it is "Nancy" then
  53.     answer "Have you checked your Horoscope today" with "Yes" or "No"
  54.     exit mouseUp
  55.   else if it is "Barbara" then
  56.     play "Car Horn"
  57.     exit mouseUp
  58.         else if it is "Hillary" then doHillary
  59. end mouseUp
  60.  
  61. on doHillary
  62.   answer "Select a Topic" with "Makeover" or "WWater" or "HCare"
  63. end doHillary
  64.  
  65. If you register your copy of SODAColor, you will receive extra documentation on how to access
  66. many of its built-in features.  For now consider yourself limited to basic HyperCard constructs.
  67.  
  68. For the more adventurous...
  69. You may wish to write Plug-Ins for XFCN's and XCMD's.  
  70.   
  71. ∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞
  72.  
  73.  
  74.  
  75.  
  76.